//package com.auth.controller;
//
//import com.auth.pojo.Bo.TokenBO;
//import com.auth.service.AuthService;
//import com.common.result.CommonResult;
//import com.tms.common.core.domain.R;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.HttpRequestMethodNotSupportedException;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.security.Principal;
//import java.util.Map;
//
///**
// * Oauth2登录认证
// * author wangbaohai
// */
//@RestController
//@RequestMapping("/oauth")
//public class AuthController {
//
//    @Autowired
//    private AuthService authService;
//
//    /**
//     * 获取Token
//     * author wangbaohai
//     */
//    @RequestMapping(value = "/token", method = RequestMethod.POST)
//    public R<TokenBO> postAccessToken(
//            Principal principal, @RequestParam Map<String, String> parameters)
//            throws HttpRequestMethodNotSupportedException {
//        return authService.postAccessToken(principal, parameters);
//    }
//
////    /**
////     * 调取集团授权码后的token值
////     * author
////     */
////    @RequestMapping(value = "/token", method = RequestMethod.GET)
////    public CommonResult<TokenBO> postBamToken(Principal principal,
////                                              @RequestParam Map<String, String> parameters)
////            throws HttpRequestMethodNotSupportedException{
////        return authService.postAccessToken(principal,parameters);
////    }
//}
